<div class="list-container">
<div class="row m-0 list-header">
   <div class="col-10 p-0">
      <h2>Roles</h2>
   </div>
   <div class="col-2 p-0 float-right text-right">
      <%= link(raw("<i class='fas fa-plus'></i> New Role"), to: role_path(@conn, :new), class: "btn btn-primary float-right") %>
   </div>
</div>
<div class="row m-0 list">
   <%= for role <- @roles do %>
   <div class="table-contaner col-12 p-3 mb-2">
      <div class="row">
         <div class="col-11 pl-0">
            <div class="media">
               <div class="checkbox mx-3">
                  <label>
                  <input type="checkbox" value="">
                  <span class="cr"><i class="cr-icon fa fa-check"></i></span>
                  </label>
               </div>
               <div class="media-body">
                  <%= role.name %>
               </div>
            </div>
         </div>
         <%= unless is_default_role(role.name) do %>
            <div class="col-1">
               <div class="dropdown col-12 p-0 float-right options-container">
                  <a class="p-2 dropdown-toggle options" href="#" role="button"  data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="fa fa-cog"></i>
                  </a>
                  <div class="dropdown-menu dropdown-menu-right" >
                     <%= link("Edit", to: role_path(@conn, :edit, role.id), class: "dropdown-item") %>
                     <%= link("Delete", to: role_path(@conn, :delete, role.id),
                        method: :delete, data: [confirm: "Are you sure you want to delete?"], class: "dropdown-item") %> 
                  </div>
               </div>
            </div>
         <% end %>
      </div>
   </div>
   <% end %>
</div>
